package com.bigknow.appstore.server.service;

import com.bigknow.appstore.server.rpc.SSLServer;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Service
public class RPCService {

    private SSLServer server;

    @PostConstruct
    private void init() {
        server = new SSLServer(6081, 5, 20);
        server.start();
    }

    @PreDestroy
    private void destroy() {
        server.stop();
    }
}
